﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JiaBao.Core.Plugins
{
    public interface IPluginFinder
    {

        /// <summary>
        /// 获取插件
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="loadMode"></param>
        /// <returns></returns>
        IEnumerable<T> GetPlugins<T>(LoadPluginsMode loadMode = LoadPluginsMode.InstalledOnly) where T : class, IPlugin;


        /// <summary>
        /// 根据SystemName获取插件
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="systemName"></param>
        /// <param name="loadMode"></param>
        /// <returns></returns>
        PluginDescriptor GetPluginDescriptorBySystemName<T>(string systemName, LoadPluginsMode loadMode = LoadPluginsMode.InstalledOnly)
            where T : class, IPlugin;

    }
}
